package com.ruoyi.web.service.incomeexpense;


import com.ruoyi.web.domain.incomeexpense.IncomeExpense;
import com.ruoyi.web.domain.incomeexpense.Proportion;
import com.ruoyi.web.pojo.dto.incomeexpense.IncomeExpensePage;
import com.ruoyi.web.pojo.dto.incomeexpense.ProportionListVo;
import com.ruoyi.web.pojo.request.incomeexpense.IEDetailsReq;
import com.ruoyi.web.pojo.request.incomeexpense.IEPageReq;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 支入支出Service接口
 * 
 * @author zq
 * @date 2024-01-09
 */
public interface IIncomeExpenseService 
{
    /**
     * 查询支入支出
     * 
     * @param id 支入支出主键
     * @return 支入支出
     */
    public IncomeExpensePage selectIncomeExpenseById(Long id);

    /**
     * 查询支入支出列表
     * 
     * @return 支入支出集合
     */
    public List<IncomeExpensePage> selectIncomeExpenseList(IEPageReq req);

    /**
     * 新增支入支出
     * 
     * @param incomeExpense 支入支出
     * @return 结果
     */
    public int insertIncomeExpense(IncomeExpense incomeExpense);

    /**
     * 修改支入支出
     * 
     * @param incomeExpense 支入支出
     * @return 结果
     */
    public int updateIncomeExpense(IncomeExpense incomeExpense);

    /**
     * 批量删除支入支出
     * 
     * @param ids 需要删除的支入支出主键集合
     * @return 结果
     */
    public int deleteIncomeExpenseByIds(Long[] ids);

    /**
     * 删除支入支出信息
     * 
     * @param id 支入支出主键
     * @return 结果
     */
    public int deleteIncomeExpenseById(Long id);

    /**
     * 小程序查询明显列表
     * @param req
     * @return
     */
    List<Proportion> selectDetailsList(IEDetailsReq req);

    ProportionListVo selectDetailsListVo(IEDetailsReq req);
    /**
     * zq
     * 统计收入和支出
     * @return Map<String,Object>
     */
    Map<String,Object> countIncomeExpenseMoney();

    /**
     * 统计个数
     * @param req 请求
     * @return long
     */
    long count(IEPageReq req);

    /**
     * 导出
     * @param req 请求
     * @param response rep
     * @throws Exception 异常
     */
    String export(IEDetailsReq req, HttpServletResponse response) throws Exception;

    String export(IEDetailsReq req);

    /**
     * 利润
     * @param req 请求
     * @return Map<String, Object>
     */
    Map<String, Object> profit(IEDetailsReq req);
}
